package springCache;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Cat {
    @Autowired
    private Dog lover;

    public Cat() {
        System.out.println("Cat 被创建");
    }

    public String getName() {
        return "小花";
    }

    public String getLoverName() {
        return lover.getName();
    }

}
